package com.example.backgroundmanger.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.List;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

/**
 * <p>
 * 
 * </p>
 *
 * @author 坤哥
 * @since 2024-07-06
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_menu")
@Schema(name = "Menu", description = "")
public class Menu implements Serializable {

    private static final long serialVersionUID = 1L;

      @Schema(description = "菜单ID")
        @TableId(value = "id", type = IdType.AUTO)
      private Integer id;

      @Schema(description = "菜单名称")
      private String name;

      @Schema(description = "菜单组件")
      private String component;

      @Schema(description = "菜单路径")
      private String path;

      @Schema(description = "菜单的重定向")
      private String redirect;

      @Schema(description = "菜单图标")
      private String icon;

      @Schema(description = "菜单父ID")
      private Integer parentId;

      @Schema(description = "是否为叶子结点")
      private String isLeaf;

      //子菜单
      @TableField(exist = false)
      private List<Menu> children;
}
